const yunnanRegions = [
  { name: '云南省', value: '530000' },
  { name: '昆明市', value: '530100' },
  { name: '五华区', value: '530102' },
  { name: '盘龙区', value: '530103' },
  { name: '官渡区', value: '530111' },
  { name: '西山区', value: '530112' },
  { name: '东川区', value: '530113' },
  { name: '呈贡区', value: '530114' },
  { name: '晋宁区', value: '530115' },
  { name: '富民县', value: '530124' },
  { name: '宜良县', value: '530125' },
  { name: '石林彝族自治县', value: '530126' },
  { name: '嵩明县', value: '530127' },
  { name: '禄劝彝族苗族自治县', value: '530128' },
  { name: '寻甸回族彝族自治县', value: '530129' },
  { name: '安宁市', value: '530181' },
  { name: '曲靖市', value: '530300' },
  { name: '麒麟区', value: '530302' },
  { name: '沾益区', value: '530303' },
  { name: '马龙区', value: '530304' },
  { name: '陆良县', value: '530322' },
  { name: '师宗县', value: '530323' },
  { name: '罗平县', value: '530324' },
  { name: '富源县', value: '530325' },
  { name: '会泽县', value: '530326' },
  { name: '宣威市', value: '530381' },
  { name: '玉溪市', value: '530400' },
  { name: '红塔区', value: '530402' },
  { name: '江川区', value: '530403' },
  { name: '通海县', value: '530423' },
  { name: '华宁县', value: '530424' },
  { name: '易门县', value: '530425' },
  { name: '峨山彝族自治县', value: '530426' },
  { name: '新平彝族傣族自治县', value: '530427' },
  { name: '元江哈尼族彝族傣族自治县', value: '530428' },
  { name: '澄江市', value: '530481' },
  { name: '保山市', value: '530500' },
  { name: '隆阳区', value: '530502' },
  { name: '施甸县', value: '530521' },
  { name: '龙陵县', value: '530523' },
  { name: '昌宁县', value: '530524' },
  { name: '腾冲市', value: '530581' },
  { name: '昭通市', value: '530600' },
  { name: '昭阳区', value: '530602' },
  { name: '鲁甸县', value: '530621' },
  { name: '巧家县', value: '530622' },
  { name: '盐津县', value: '530623' },
  { name: '大关县', value: '530624' },
  { name: '永善县', value: '530625' },
  { name: '绥江县', value: '530626' },
  { name: '镇雄县', value: '530627' },
  { name: '彝良县', value: '530628' },
  { name: '威信县', value: '530629' },
  { name: '水富市', value: '530681' },
  { name: '丽江市', value: '530700' },
  { name: '古城区', value: '530702' },
  { name: '玉龙纳西族自治县', value: '530721' },
  { name: '永胜县', value: '530722' },
  { name: '华坪县', value: '530723' },
  { name: '宁蒗彝族自治县', value: '530724' },
  { name: '普洱市', value: '530800' },
  { name: '思茅区', value: '530802' },
  { name: '宁洱哈尼族彝族自治县', value: '530821' },
  { name: '墨江哈尼族自治县', value: '530822' },
  { name: '景东彝族自治县', value: '530823' },
  { name: '景谷傣族彝族自治县', value: '530824' },
  { name: '镇沅彝族哈尼族拉祜族自治县', value: '530825' },
  { name: '江城哈尼族彝族自治县', value: '530826' },
  { name: '孟连傣族拉祜族佤族自治县', value: '530827' },
  { name: '澜沧拉祜族自治县', value: '530828' },
  { name: '西盟佤族自治县', value: '530829' },
  { name: '临沧市', value: '530900' },
  { name: '临翔区', value: '530902' },
  { name: '凤庆县', value: '530921' },
  { name: '云县', value: '530922' },
  { name: '永德县', value: '530923' },
  { name: '镇康县', value: '530924' },
  { name: '双江拉祜族佤族布朗族傣族自治县', value: '530925' },
  { name: '耿马傣族佤族自治县', value: '530926' },
  { name: '沧源佤族自治县', value: '530927' },
  { name: '楚雄彝族自治州', value: '532300' },
  { name: '楚雄市', value: '532301' },
  { name: '禄丰市', value: '532302' },
  { name: '双柏县', value: '532322' },
  { name: '牟定县', value: '532323' },
  { name: '南华县', value: '532324' },
  { name: '姚安县', value: '532325' },
  { name: '大姚县', value: '532326' },
  { name: '永仁县', value: '532327' },
  { name: '元谋县', value: '532328' },
  { name: '武定县', value: '532329' },
  { name: '红河哈尼族彝族自治州', value: '532500' },
  { name: '个旧市', value: '532501' },
  { name: '开远市', value: '532502' },
  { name: '蒙自市', value: '532503' },
  { name: '弥勒市', value: '532504' },
  { name: '屏边苗族自治县', value: '532523' },
  { name: '建水县', value: '532524' },
  { name: '石屏县', value: '532525' },
  { name: '泸西县', value: '532527' },
  { name: '元阳县', value: '532528' },
  { name: '红河县', value: '532529' },
  { name: '金平苗族瑶族傣族自治县', value: '532530' },
  { name: '绿春县', value: '532531' },
  { name: '河口瑶族自治县', value: '532532' },
  { name: '文山壮族苗族自治州', value: '532600' },
  { name: '文山市', value: '532601' },
  { name: '砚山县', value: '532622' },
  { name: '西畴县', value: '532623' },
  { name: '麻栗坡县', value: '532624' },
  { name: '马关县', value: '532625' },
  { name: '丘北县', value: '532626' },
  { name: '广南县', value: '532627' },
  { name: '富宁县', value: '532628' },
  { name: '西双版纳傣族自治州', value: '532800' },
  { name: '景洪市', value: '532801' },
  { name: '勐海县', value: '532822' },
  { name: '勐腊县', value: '532823' },
  { name: '大理白族自治州', value: '532900' },
  { name: '大理市', value: '532901' },
  { name: '漾濞彝族自治县', value: '532922' },
  { name: '祥云县', value: '532923' },
  { name: '宾川县', value: '532924' },
  { name: '弥渡县', value: '532925' },
  { name: '南涧彝族自治县', value: '532926' },
  { name: '巍山彝族回族自治县', value: '532927' },
  { name: '永平县', value: '532928' },
  { name: '云龙县', value: '532929' },
  { name: '洱源县', value: '532930' },
  { name: '剑川县', value: '532931' },
  { name: '鹤庆县', value: '532932' },
  { name: '德宏傣族景颇族自治州', value: '533100' },
  { name: '瑞丽市', value: '533102' },
  { name: '芒市', value: '533103' },
  { name: '梁河县', value: '533122' },
  { name: '盈江县', value: '533123' },
  { name: '陇川县', value: '533124' },
  { name: '怒江傈僳族自治州', value: '533300' },
  { name: '泸水市', value: '533301' },
  { name: '福贡县', value: '533323' },
  { name: '贡山独龙族怒族自治县', value: '533324' },
  { name: '兰坪白族普米族自治县', value: '533325' },
  { name: '迪庆藏族自治州', value: '533400' },
  { name: '香格里拉市', value: '533401' },
  { name: '德钦县', value: '533422' },
  { name: '维西傈僳族自治县', value: '533423' }
]

export function getAreaByCode(code) {
  const foundRegion = yunnanRegions.find((region) => region.value === code)
  return foundRegion ? foundRegion.name : ''
}